package static1;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2021-03-15 20:32
 **/
public class StaticTest {
    static int age=0;
    String name;

    public StaticTest() {
        age++;
    }

    @Override
    public String toString() {
        return "StaticTest{age="+age+"}";
    }

    public static void main(String[] args) {
        StaticTest s1 = new StaticTest();
        System.out.println(s1);
        StaticTest s2 = new StaticTest();
        System.out.println(s2);
    }
}
